[C# asp.net mvc or javascript] user-friendly xml sensitization library that html encoding invalid pa

Posted by Fox on Stack Overflow See other posts from Stack Overflow or by Fox
Published on 2010-04-06T06:31:47Z Indexed on 2010/04/06 6:33 UTC
Read the original article Hit count: 361

Filed under:
|
|
|
|

I would like to allow my users to submit a subset of xhtml that will be displayed to other users (likely I'll build a schema for it) but I want the server to handle validation more gracefully then hard rejecting invalid submissions.... Instead I'd like the server to Html Encode invalid/harmful parts of the submissions.... (sanitize javascript and css etc.)

Is there any library (maybe asp.net mvc 2 has such functionality?) or do I have to develop my own?

or maybe there is a javascript library that html encodes invalid parts and I can just have the server only accept that subset?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET